/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.testis.orm.dynamicmap.validation;

import org.testis.orm.refinedclasses.DynamicMapDesignTreeNode;

/**
 * 
 * @author nurhat
 */
public class ValidationFactory {

    public static IValidateDynamicMapNode getValidationMethod(
	    DynamicMapDesignTreeNode node) {
	if (node.getObject().getTypeName().equals("UIDeviceMapContainer")) {
	    return new ValidateUIDeviMapContainerObject();
	} else if (node.getObject().getTypeName().equals("UILink")) {
	    return new ValidateUILinkObject();
	} else if (node.getObject().getTypeName().equals("UIDynamicGrid")) {
	    return new ValidateUIDynamicGridObject();
	} else if (node.getObject().getGroupName().equals("ObjectGroup")) {
	    return new ValidateUIObjectGroup();
	} else if (node.getObject().getGroupName().equals("Container")) {
	    return new ValidateUIContainer();
	} else {
	    return new ValidateUIObject();
	}
    }
}
